Skip to content

Conversation

@rashtao
Copy link
Contributor

@rashtao rashtao commented Oct 28, 2025

This PR adds to jnosql-tinkerpop tests for ArangoDB and TinkerGraph backends.
The same tests are now run against the following matrix of graph providers:

  • Neo4j
  • ArangoDB
  • TinkerGraph

This can be in future further extended with additional tinkerpop graph providers.

In addition, to make this work, the following changes have been made to jnosql-tinkerpop production code:

  • The mapping of the ids has been changed to Gremlin id (~id), see org.apache.tinkerpop.gremlin.structure.T#id.
  • Updating an entity with null id throws now IllegalArgumentException instead of EmptyResultException.
  • Ids and labels are not stored as element properties anymore, i.e. avoiding duplication of persisted fields.
  • DefaultTinkerpopGraphDatabaseManager#insert(CommunicationEntity) has been optimized persisting id, label and properties atomically.

The following changes have been made to jnosql-tinkerpop test code:

  • changed id types to String
  • annotated entities ids with @Id("~id")
  • created CDI producers for each target backend
  • implemented test matrixes with inner classes for each target backend, e.g.:
      @EnableAutoWeld
      // ...
      abstract class EdgeEntityTest {
    
          @AddPackages(ArangoDBGraphProducer.class)
          static class ArangoDBTest extends EdgeEntityTest {
          }
    
          @AddPackages(Neo4jGraphProducer.class)
          static class Neo4jTest extends EdgeEntityTest {
          }
    
          @AddPackages(TinkerGraphProducer.class)
          static class TinkerGraphTest extends EdgeEntityTest {
          }
    
          @Inject
          private TinkerpopTemplate tinkerpopTemplate;
    
          @Test
          void foo() {
          }
    
          // ...
    
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant